package com.bys.admin.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.bys.admin.system.entity.SysCodegenColumn;
import com.bys.admin.system.mapper.SysCodegenColumnMapper;
import com.bys.admin.system.service.ISysCodegenColumnService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 代码生成 column 表 服务实现类
 * </p>
 *
 * @author bys
 * @since 2025-02-20
 */
@Service
public class SysCodegenColumnServiceImpl extends ServiceImpl<SysCodegenColumnMapper, SysCodegenColumn> implements ISysCodegenColumnService {



    @Override
    public List<SysCodegenColumn> listByTableId(Long tableId) {
        return list(new LambdaQueryWrapper<SysCodegenColumn>().eq(SysCodegenColumn::getTableId,tableId).orderByAsc(SysCodegenColumn::getOrdinalPosition));
    }


}
